CSS Portal

CSS Border Radius Generator

This generator will help you create the CSS code necessary to style elements with rounded corners using the border-radius property on your webpages. With this tool, you can choose to apply a uniform radius to all corners, or customize each corner individually for more complex shapes.

New in this updated version: You can now also use the modern corner-shape property to create a variety of corner styles such as round, scoop, bevel, notch, square, squircle, and superellipse. This allows for more advanced and visually distinctive corner effects that go beyond the traditional border-radius options. You can apply the same corner style to all corners or customize each corner separately.

With the generator, you can instantly preview your selected corner styles in the live demo pane and copy the corresponding CSS code for use in your projects.

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!
Radius Options


20px


This property is Experimental, it may not work in all browsers!
2
Display units in:
Border Options
2px
Border Radius Preview
Preview Area
CSS Code
If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!

Border Radius Property

The CSS property border-radius allows you to make a rounded border or round the corners of an element. The value of the property determines the radius of the circle. When using the property, instead of drawing the usual right corners of the element, a rounded frame with rounded corners will be used according to an arc of a circle with a given radius:

border-radius
Fig.1 - Border-Radius Circle Example.

The CSS property border-radius can contain from one to four values, separated by spaces. The number of values determines how the corner rounding radii are set. If more than one value is specified, corner rounding is set starting at the top left corner:

1 Value:

Example: div { border-radius: 10px; }
• The first value - Sets the radius for all corners of the block.

2 Values:

Example: div { border-radius: 10px 20px; }
• First value - Sets the radius for the top left and bottom right corners of the block.
• Second value - Sets the radius for the top right and bottom left corners of the block.

3 Values:

Example: div { border-radius: 10px 20px 5px; }
• First value - Sets the radius of the rounding of the top left corner of the block.
• Second value - Simultaneously sets the radius for the top right and bottom left corners of the block.
• Third value - Sets the radius of the bottom right corner of the block.

4 Values:

Example: div { border-radius: 10px 20px 5px 40px; }
• First value - Sets the radius of the top left corner of the block.
• Second value - Sets the radius of the top right corner of the block.
• Third value - Sets the radius of the bottom right corner of the block.
• The fourth value - Sets the radius of the bottom left corner of the block.

In addition to the border-radius property, you can also set theradius of each corner of the block separately using the following CSS propeties:

The border-radius property also allows you to round off corners as an oval arc rather than a circle:

border-radius
Fig.2 - Border-Radius Ellipse Example.

To define an oval, a combination of two values is used, separated by an / symbol:

border-radius: 20px / 35px;

The value to the left of the slash defines the horizontal radius and the value to the right defines the vertical radius.

Each of the two parts (before and after the slash) follows the same rules as when creating round radius. This means that each part can contain from one to four values, separated by spaces. And the number of specified values will determine how the corner radii are set. For example, the four values before the symbol / represent the horizontal radii for the top-left, top-right, bottom-right, and bottom-left corners. The values after the symbol / respectively represent the vertical radii for the same corners.

Example: div { border-radius: 25px / 10px; }
• First value - Sets the radius of the horizontal radius of each corner of the block.
• Second value - Sets the radius of the vertical radius of each corner of the block.

CSS References Used

CSS Property
corner-shape
CSS Property
border-radius
CSS Property
border-top-left-radius
CSS Property
border-top-right-radius
CSS Property
border-bottom-left-radius
CSS Property
border-bottom-right-radius
CSS Property
border
CSS Data Type
<color>
CSS Data Type
<length>
If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!